package top.retain;

/**
 * @author ivorfan
 * @date 2021/8/2 14:46
 */
public class OOP {

    static class A{
        public void a(A a) {
            System.out.println(a.hashCode() + "aa");
        }
    }
    static class B extends A {

        @Override
        public void a(A a) {
            System.out.println(a.hashCode() + "ba");
        }
    }
    static class C extends A {}
    public void a(A a) {
        System.out.println(a.hashCode() + "a");
    }
    public void a(B b) {
        System.out.println(b.hashCode()+ " b");
    }
    public void a(C c) {
        System.out.println(c.hashCode() + "c");
    }

    public static void main(String[] args) {
        OOP o = new OOP();
        A b = new A();
        A c = new C();
        b.a(b);

    }
}
